import fetch from "@/utils/fetch";

// 说明：小区总水量分析  月表
// 接口：api/cb/flCommunityMonthWaterAnalysis/getTree
// 请求类型：Post

export function searchFlCommunityMonthWaterAnalysisTree(data) {
    return fetch({
        url: "api/cb/flCommunityMonthWaterAnalysis/getTree",
        method: "post",
        data: {...data },
    });
}

// After

// 说明：添加小区总水量分析  月表
// 接口：api/cb/flCommunityMonthWaterAnalysis
// 请求类型：Post
export function addFlCommunityMonthWaterAnalysis(obj) {
    return fetch({
        url: "api/cb/flCommunityMonthWaterAnalysis",
        method: "post",
        data: obj,
    });
}

// 说明：删除小区总水量分析  月表
// 接口：api/cb/flCommunityMonthWaterAnalysis/ids
// 请求类型：Delete
export function deleteFlCommunityMonthWaterAnalysis(idArr) {
    return fetch({
        url: "api/cb/flCommunityMonthWaterAnalysis/del",
        method: "delete",
        data: idArr,
    });
}

// 说明：修改小区总水量分析  月表
// 接口：api/cb/flCommunityMonthWaterAnalysis/{id}
// 请求类型：Put
export function modifyFlCommunityMonthWaterAnalysis(id, obj) {
    return fetch({
        url: "api/cb/flCommunityMonthWaterAnalysis/" + id,
        method: "put",
        data: obj,
    });
}

// 说明：小区总水量分析  月表分页查询(条件搜索)
// 接口：api/cb/flCommunityMonthWaterAnalysis/search/{page}/{size}
// 请求类型：Post
export function searchFlCommunityMonthWaterAnalysis(page, size, obj) {
    return fetch({
        url: "api/cb/flCommunityMonthWaterAnalysis/search/" + page + "/" + size,
        method: "post",
        data: obj,
    });
}

// 说明：获取单个小区总水量分析  月表
// 接口：api/cb/flCommunityMonthWaterAnalysis/{id}
// 请求类型：get
export function getFlCommunityMonthWaterAnalysis(id) {
    return fetch({
        url: "api/cb/flCommunityMonthWaterAnalysis/" + id,
        method: "get",
    });
}

// 说明：小区总水量分析  月表导出Excel模板
// 接口：api/cb/flCommunityMonthWaterAnalysis/exprotExcelModel
// 请求类型：get
export function downTem() {
    return fetch({
        url: "api/cb/flCommunityMonthWaterAnalysis/exprotExcelModel",
        responseType: "blob",
        method: "get",
    });
}

// 说明：小区总水量分析  月表导出Excel数据
// 接口：api/cb/flCommunityMonthWaterAnalysis/exprotXls/{ids}
// 请求类型：post
export function exprotXls(ids, obj) {
    return fetch({
        url: "api/cb/flCommunityMonthWaterAnalysis/exprotXls/" + ids,
        responseType: "blob",
        method: "post",
        data: obj,
    });
}

// 说明：小区总水量分析  月表导入
// 接口：api/cb/flCommunityMonthWaterAnalysis/importXls
// 请求类型：post
export function importXls() {
    return fetch({
        url: "api/cb/flCommunityMonthWaterAnalysis/importXls",
        method: "post",
    });
}
